﻿@model Magicodes.WeiChat.Data.Models.AppUser

@{
    ViewBag.Title = "编辑";
    ViewBag.ShowPageHeader = false;
}
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-9">
        <h2>@ViewBag.Title</h2>
        <ol class="breadcrumb">
            <li>
                <a href="/">主页</a>
            </li>
            <li>
                <a href="@Url.Action("Index")">租户成员管理</a>
            </li>
            <li class="active">
                <strong>@ViewBag.Title</strong>
            </li>
        </ol>
    </div>
</div>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <hr style="margin:2px 2px 10px 2px;" />
                    @using (Html.BeginForm())
                    {
                        @Html.AntiForgeryToken()

                        <div class="form-horizontal">
                            @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                            @Html.HiddenFor(model => model.Id)

                            <div class="form-group">
                                @Html.LabelFor(model => model.OpenId, htmlAttributes: new { @class = "control-label col-sm-2" })
                                <div class="col-sm-10">
                                    @Html.EditorFor(model => model.OpenId, new { htmlAttributes = new { @class = "form-control" } })
                                    @*<span class="help-block m-b-none">辅助性描述文字。</span>*@
                                    @Html.ValidationMessageFor(model => model.OpenId, "", new { @class = "text-danger" })
                                </div>
                            </div>

                            <div class="form-group">
                                @Html.LabelFor(model => model.Email, htmlAttributes: new { @class = "control-label col-sm-2" })
                                <div class="col-sm-10">
                                    @Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control" } })
                                    @*<span class="help-block m-b-none">辅助性描述文字。</span>*@
                                    @Html.ValidationMessageFor(model => model.Email, "", new { @class = "text-danger" })
                                </div>
                            </div>

                            <div class="form-group">
                                @Html.LabelFor(model => model.PhoneNumber, htmlAttributes: new { @class = "control-label col-sm-2" })
                                <div class="col-sm-10">
                                    @Html.EditorFor(model => model.PhoneNumber, new { htmlAttributes = new { @class = "form-control" } })
                                    @*<span class="help-block m-b-none">辅助性描述文字。</span>*@
                                    @Html.ValidationMessageFor(model => model.PhoneNumber, "", new { @class = "text-danger" })
                                </div>
                            </div>

                            <div class="form-group">
                                @Html.LabelFor(model => model.TwoFactorEnabled, htmlAttributes: new { @class = "control-label col-sm-2" })
                                <div class="col-sm-10">
                                    <div class="checkbox">
                                        @Html.EditorFor(model => model.TwoFactorEnabled, new { htmlAttributes = new { @class = "i-checks" } })
                                        @*<span class="help-block m-b-none">辅助性描述文字。</span>*@
                                        @Html.ValidationMessageFor(model => model.TwoFactorEnabled, "", new { @class = "text-danger" })
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                @Html.LabelFor(model => model.UserName, htmlAttributes: new { @class = "control-label col-sm-2" })
                                <div class="col-sm-10">
                                    @Html.EditorFor(model => model.UserName, new { htmlAttributes = new { @class = "form-control" } })
                                    @*<span class="help-block m-b-none">辅助性描述文字。</span>*@
                                    @Html.ValidationMessageFor(model => model.UserName, "", new { @class = "text-danger" })
                                </div>
                            </div>
                            
                            <div class="form-group">
                                @Html.LabelFor(model => model.TenantId, htmlAttributes: new { @class = "control-label col-sm-2" })
                                <div class="col-sm-10">
                                    @Html.DropDownList("TenantId")
                                    @*@Html.DropDownListFor(model => model.TenantId, ViewBag.TenantId as SelectList, new { @class = "form-control" })*@
                                    @Html.ValidationMessageFor(model => model.TenantId, "", new { @class = "text-danger" })
                                </div>
                            </div>


                            <div class="form-group">
                                <div class="col-md-offset-2 col-sm-10">
                                    <button type="submit" class="btn btn-primary"><i class="fa fa-save"></i>&nbsp;提交</button>
                                    <a href="@Url.Action("Index")" class="btn btn-primary"><i class="fa fa-mail-reply"></i>&nbsp;返回</a>
                                </div>
                            </div>
                        </div>
                    }
                </div>
            </div>
        </div>
    </div>
</div>
@section Styles {
    @Styles.Render("~/Content/plugins/iCheck/iCheckStyles")
}
@section Scripts {
    @Scripts.Render("~/plugins/iCheck")
    <script type="text/javascript">
        $(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
            $('select').addClass("form-control");
        });
    </script>
}
